package codingforgreat.class16;

public class Class05_JosephusProblem {
    public int iceBreakingGame(int num, int target) {
        return getLive(num,target);
    }
    public int getLive(int n,int m){
        if(n == 1){
            return 1;
        }
        return (getLive(n - 1, m) + m - 1) % n + 1;
    }
}
